package com.smiier.skin.net;

import android.content.Context;
import cn.o.app.io.INoProguard;
import cn.o.app.net.NetTask;

import com.smiier.skin.constant.Constant;
import com.smiier.skin.net.AccountRechargeApplyTask.AccountRechargeApplyRequest;
import com.smiier.skin.net.AccountRechargeApplyTask.AccountRechargeApplyResponse;
import com.smiier.skin.net.entity.Order;
import com.smiier.skin.util.GlobalSettings;

/**
 * 充值申请
 * 
 * @author 杨文华
 * 
 */
public class AccountRechargeApplyTask extends
		NetTask<AccountRechargeApplyRequest, AccountRechargeApplyResponse> {

	public static class AccountRechargeApplyRequest extends ORequest {
		public double cost;
		public String token;
		public String Pay_Platform = GlobalSettings.PAY_PLATFORM_WEIXIN;
		public String appname = Constant.APP_NAME;
		public String spbill_create_ip;
	}

	public static class AccountRechargeApplyResponse extends OResponse {
		public AccountRechargeApplyRes Res;
	}

	public static class AccountRechargeApplyRes {
		public Order Order;
		public WeiXinGenprepay WeiXinXMLRes;
	}

	public static class WeiXinGenprepay implements INoProguard {
		public String appid;
		public String partnerId;
		public String prepayId;
		public String packageValue;
		public String sign;
		public String nonceStr;
		public String timeStamp;
		public String return_code;

	}

	@Override
	public void setContext(Context context) {
		super.setContext(context);
		mUrl = GlobalSettings.SERVER_URL + GlobalSettings.SERVER_URL_JOIN
				+ "?api=Account.RechargeApply";
		mRequestMethod = METHOD_GET;
	}

}
